package edu.scnu.fans.fingertip.user.api;

import edu.scnu.fans.fingertip.common.api.ApiResponse;
import edu.scnu.fans.fingertip.common.api.HeaderConstant;
import edu.scnu.fans.fingertip.user.output.VerifyTokenOutput;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 用户 Feign 微服务调用接口
 */
@FeignClient("fingertip-user")
public interface UserApi {

    @ApiOperation("验证token")
    @PostMapping("/fingertip/user/v1/verifyToken")
    ApiResponse<VerifyTokenOutput> verifyToken(@RequestHeader(HeaderConstant.USER_ID) Long userId,
                                               @RequestHeader(HeaderConstant.TOKEN) String token);
}
